import * as THREE from "three";

const geometry = new THREE.BoxGeometry(60, 30, 20)
const material = new THREE.MeshLambertMaterial({
    color: 0xffff00,
    transparent: true,
    opacity: 0.8
})
const boxMesh = new THREE.Mesh(geometry, material)
// .rotation角度属性和角度属性值欧拉Euler
// 欧拉角描述一个旋转变换，通过指定轴顺序和其各个抽向上的指定旋转角度来旋一个物体，
// 对 Euler 实例进行遍历将按相应的顺字生成它的分量(x，y, z, order).

const euler = new THREE.Euler(0, Math.PI, 0)
boxMesh.rotation.y = Math.PI / 4 //绕Y轴转一个角度---可用于旋转动画
boxMesh.rotateY(Math.PI/2) //45°
export default boxMesh